Configuring Export: PGAS Data XML Commands

Note: This command is provided as an optional feature. For this command to function, additional file requirements must be met.

If installed, use the Export: PGAS Data XML command to export raw data records for a defined time range from FMS to a specified directory location in a PGAS XML format (conforms to PGAS version 16). Data that is not from a raw data source, e.g. has been imported into FMS via .csv files (categorized as a "User file" source), is not included in the export.

When the Export: PGAS Data XML command is executed, data is resolved for each eligible device via hard coded data item mappings in the application. To achieve this, a command definition file (CDF) must also be present, so that the FMS can export the raw data records specified. The file is not editable at this time.

See FMS Commands and PGAS Data XML for more information about using this command via CygNet Explorer (MSS).

See Scheduling FMS Command Tasks in the MSS for more information about scheduling commands.

See FMS ActiveX Controls and CxHmiFms for more information about using commands via FMS ActiveX controls on CygNet Studio or CygNet Vision screens.

See CxFms for more information about scripting commands.

Command Requirements

To enable the command to export raw data to PGAS XML files, and see the command listed in command management options, the following elements must be present.

Note: Refer to Quorum PGAS documentation and/or contact your PGAS representative for the most current information about PGAS versions, and specific PGAS configuration details.

Configuring an Export: PGAS Data XML Command

If desired (optional), familiarize yourself with item mappings used by the system to export the raw data. These items cannot currently be viewed in the file, and the file content must not be altered.

Use the following procedure to configure PGAS Data XML exports.

To Configure an Export: PGAS Data XML Command

  1. Open the Command menu in FMS Explorer.
  2. Click Manage to access the FMS Command Definitions dialog box and then click Add to access the Create New FMS Command Definition dialog box.

Create New FMS Command Definition

Create New FMS Command Definition
Export: PGAS Data XML Command

  1. Define the command definition properties.
  1. Type a Name for the command into the text box. Maximum character count is 50.
  2. Select the Command type from the drop-down menu.
  3. Select a processing Priority from the drop-down menu.
  4. Select a Logging level from the drop-down menu, to determine the level of logging details reported when viewing command logs. Options include Low, Medium, and High. See Viewing Command Logs for more information.
  5. Click to select/clear the check box to Prompt when command runs.
  1. Define the command parameters. The parameters for the Export: PGAS Data XML command are described in the Command parameters box, which includes the Description, a Required indicator, and a configurable Value field. Set the value for each required and each desired optional parameter, as indicated in its Value field.
  1. Click Create New. The new command will appear in the list of FMS Command Definitions.

Command Definition Properties

The following command definition properties apply to Export: PGAS Data XML commands.

Property Description

Name

Type in a Name for the new command.

Command type

Select the desired Command type from the drop-down menu.

See FMS Commands for more information about available command types.

Priority

Select a processing queue Priority for the command from the drop-down menu.

Options from least to greatest priority are as follows.

  • Low level
  • Medium level
  • High level
  • User initiated transaction
  • Admin initiated transaction

Default value is Low level processing queue priority.

Logging

Select a Logging level for the command results from the drop-down menu.

Options are as follows.

  • Low — displays errors
  • Medium — displays errors and warnings
  • High — displays errors, warnings, and additional information applicable to the command

Default value is Low level logging when scheduling a command in the MSS.

Default value is High level logging when creating or running an ad-hoc command in FMS Explorer.

Prompt when command runs

Click to select/clear the check box to Prompt when command runs. Selecting this option means you will receive a prompt asking if you want to modify the parameters before the command is executed.

Back to top

Command Parameters

The following command parameters apply to Export: PGAS Data XML commands when creating or editing commands via FMS Explorer.

Description Value

Date format

Select the desired time format for data selection, from the drop-down menu.

Options are as follows.

  • Contract
  • Device
  • Local

Default value is Device time.

Start date/time

Select the beginning date and time of the range for which to export device records.

Click ... to access the Select Start Date/time dialog box. See Selecting Date and Time for more information.

See Note below this table.

This parameter is required.

End date/time

Select the ending date and time of the range for which to export device records.

Click ... to access the Select End Date/time dialog box. See Selecting Date and Time for more information.

See Note below this table.

This parameter is required.

Directory to export file

Enter the directory location to which the file will be exported.

Type the directory location for the file into the text box or click ... to access the Browse For Folder dialog box, browse to the directory location, and then click OK.

This parameter is required.

Export directory format

Select a file directory format for the XML export file, from the options in the drop-down menu.

Options are as follows.

  • Directory for each polling facility
  • Directory for each device
  • Single directory for all devices

This parameter is required.

Name of export file

Select a file name format for the XML export file, from the options in the drop-down menu.

Options are as follows.

  • Date the export file was created
  • Date of first export history value
  • Node name

This parameter is required.

Note: When using relative (rather than absolute) date/time, if both the start and end date/time have hour, minute, and second values of 00, or if both are set to midnight, an additional day will be added to the date at the end of the range. This occurs because the service assumes the start of the day for the starting date/time and the end of the day for the ending date/time in these circumstances. Therefore requesting a time range from T to T will yield one day of data, and from T-1 to T will yield two days of data. If only one day of data is desired when using relative date/time, the start and end date/times must therefore be the same. If any of the start or end date/time hour, minute, or second values are specified as a value other than zero (or midnight) however, the range will be used as specified.

Editing or Deleting an Export: PGAS Data XML Command

See Managing Node Commands for information about editing or deleting this command.

Running an Export: PGAS Data XML Command

See Running Node Commands for information about running this command.

Using the Command Definition File

When the command is run, raw data is exported to an XML file format consumable by PGAS. CygNet Measurement uses an FMS-to-PGAS internal mapping to produce the XML file. Data is exported as follows.

Use the following procedure to make the command definition file (CDF) available to the FMS service, before executing the Export: PGAS Data XML command.

  1. On your host server, in the CygNet\Services\FMS\CommandDefs\ExportSamples folder, find the SampleExportPgasXml.cdf (command definition) file and copy it up one level to the CygNet\Services\FMS\CommandDefs folder. Remove the word "Sample" from the file name of the new copy of the file, so that the file will be recognized by the FMS. The file content must remain as-is; do not edit or add to the file.
  2. Save the ExportPgasXml.cdf file.
  3. Restart the FMS.

Note: Problems that arise while processing a command definition file are logged to the Services > FMS log file.

Mapping of FMS Data Items to PGAS Attributes

CygNet Measurement automatically maps FMS data items to their related Alarm, Characteristics, Event, and Volume PGAS XML attributes for export. To identify equivalent data items for informational purposes, the following tables indicate item mappings used.

PGAS Alarms Attributes
FMS Alarm Data Item PGAS XML Attribute - Alarm
eFMS_EVENT_TYPE_DEVICE_ID METER_ID

This column is required

eFMS_EVENT_TYPE_DATE ALARM_DATE

This column is required

Text description of event DESCRIPTION
Value that caused the alarm ALARM_VALUE
Level of the alarm ALARM_LEVEL

Back to top

PGAS Characteristics Attributes
FMS Configuration Data Item PGAS XML Attribute - Characteristics
CFmsDeviceRec.strName METER_ID
ConfigLogRec.ddtDatetime COLLECTION_DATE
eFMS_CFG_METER_ID METER_NAME
eFMS_CFG_METER_TYPE METER_TYPE
eFMS_CFG_BASE_PRESSURE PRESSURE_BASE
eFMS_CFG_BASE_TEMPERATURE TEMPERATURE_BASE
eFMS_CFG_METER_TUBE_INSIDE_DIAMETER TUBE_DIAMETER
eFMS_CFG_METER_TUBE_MATERIAL TUBE_MATERIAL
eFMS_CFG_METER_TUBE_REF_TEMP TUBE_REF_TEMP
eFMS_CFG_SP_TAP_LOCATION TAP_LOCATION
eFMS_CFG_DP_TAPS_TYPE TAP_TYPE
eFMS_CFG_ORIFICE_PLATE_BORE_SIZE ORIFICE_DIAMETER
eFMS_CFG_ORIFICE_PLATE_MATERIAL ORIFICE_MATERIAL
eFMS_CFG_ORIFICE_PLATE_REF_TEMP ORIFICE_REF_TEMP
eFMS_CFG_DP_TRANSDUCER_RANGE_HIGH DP_HIGH_RANGE
eFMS_CFG_SP_TRANSDUCER_RANGE_HIGH SP_HIGH_RANGE
eFMS_CFG_SP_SENSOR_TYPE SP_TYPE
eFMS_CFG_TEMP_TRANSDUCER_RANGE_LOW TEMP_LOW_RANGE
eFMS_CFG_TEMP_TRANSDUCER_RANGE_HIGH TEMP_HIGH_RANGE
eFMS_CFG_CALC_METHOD_FPV COMPRESSIBILITY_METHOD
eFMS_CFG_INTEGRAL_VALUE_VARIABLES EXTN_IV_METHOD
eFMS_CFG_METER_FACTOR METER_FACTOR
eFMS_CFG_GAS_K_FACTOR_VOLUME K_FACTOR
eFMS_CFG_CONTRACT_HOUR CONTRACT_HOUR
eFMS_CFG_ATMOSPHERIC_PRESSURE ATM_PRESSURE
eFMS_CFG_PIPE_COEFFICIENT_THERMAL_EXPANSION TUBE_THERMAL_EXP_COEFFICIENT
eFMS_CFG_ORIFICE_COEFFICIENT_THERMAL_EXPANSION PLATE_THERMAL_EXP_COEFFICIENT
eFMS_CFG_METER_TYPE DIFF_METER_TYPE
eFMS_CFG_METER_TUBE_MATERIAL MATERIAL
eFMS_CFG_METER_TUBE_REF_TEMP REF_TEMP
eFMS_CFG_DISCHARGE_COEFFICIENT DISCHARGE_COEF
eFMS_CFG_DP_CALIBRATE_HIGH DP_HIGH_SPAN
eFMS_CFG_DP_CALIBRATE_LOW DP_LOW_SPAN
eFMS_CFG_SP_CALIBRATE_HIGH SP_HIGH_SPAN
eFMS_CFG_SP_CALIBRATE_LOW SP_LOW_SPAN
eFMS_CFG_TEMP_CALIBRATE_HIGH TEMP_HIGH_SPAN
eFMS_CFG_TEMP_CALIBRATE_LOW TEMP_LOW_SPAN
eFMS_CFG_CALC_METHOD_DISCHARGE_COEFFICIENT DISCHARGE_COEF_METHOD
eFMS_CFG_CALC_METHOD_GAS_EXPANSION_FACTOR GAS_EXPANSION_FACTOR_METHOD
eFMS_CFG_SAMPLE_RATE SAMPLE_RATE
eFMS_CFG_BASE_COMPRESSIBILITY_OF_AIR BASE_COMPRESS_AIR
eFMS_CFG_VISCOSITY ABS_VISCOSITY
eFMS_CFG_DP_ALARM_HIGH ALARM_DP_HIGH
eFMS_CFG_DP_ALARM_LOW ALARM_DP_LOW
eFMS_CFG_SP_ALARM_HIGH ALARM_SP_HIGH
eFMS_CFG_SP_ALARM_LOW ALARM_SP_LOW
eFMS_CFG_TEMP_ALARM_HIGH ALARM_TEMP_HIGH
eFMS_CFG_TEMP_ALARM_LOW ALARM_TEMP_LOW
eFMS_CFG_FIXED_TEMP DEFAULT_FIXED_TEMP
eFMS_CFG_ELEVATION ELEVATION
eFMS_CFG_LATITUDE LATITUDE
eFMS_CFG_LONGITUDE LONGITUDE

Back to top

PGAS Event Attributes
FMS Data Item PGAS XML Attribute - Event
NodeName METER_ID
Date of event

Date/Time entry value from Raw Data control

EVENT_DATE
PGAS XML file column name

See table of PGAS Event Tag Names below

TAG_NAME
Text description of event

'Category' + 'Type' column values from Raw Data control

DESCRIPTION
Comment regarding event

'Additional Info' column value from Raw Data control

COMMENT
New record value

Value

NEW_VALUE
Old record value

Value

OLD_VALUE
PGAS Event Tag Names
FMS Data Item PGAS TAG_NAME
OrificePlateBoreSize ORIFICE_SIZE
MeterTubeInsideDiameter TUBE_DIAMETER
BaseTemperature TEMP_BASE
BasePressure CONTRACT_PRES_BASE
AtmosphericPressure SITE_ATMOS_PRES
OrificePlateMaterial PLATE_MATERIAL
MeterTubeMaterial TUBE_MATERIAL
DpTapsType DIFF_TAP_TYPE
SpTapLocation STAT_TAP_LOCA
DpTransducerRangeHigh DIFF_HI_RANGE
SpTransducerRangeHigh STATIC_HI_RANGE
TempTransducerRangeLow TEMP_LO_RANGE
TempTransducerRangeHigh TEMP_HI_RANGE
MeterId METER_NAME
DeviceType METER_TYPE
Elevation LOC_ELEVATION
Latitude LOC_LATITUDE
Longitude LOC_LONGITUDE
SpType SP_TYPE
IntegralValueVariables EXTN_IV_METHOD

Variables included in IV

Possible values are:

FLOW_ANDT

FLOW_ONLY

STANDARD

GasExpansionFactorCalc GAS_EXPANSION_FACTOR_METHOD
DischargeCoefficientCalc DISCHARGE_COEF_METHOD
FpvCalc COMPRESSIBILITY_METHOD
Methane METHANE
Ethane ETHANE
Propane PROPANE
Isobutane IBUTANE
n-Butane NBUTANE
Isopentane IPENTANE
n-Pentane NPENTANE
Neopentane NEO_PENTANE
n-Hexane HEXANE
n-Heptane HEPTANE
n-Octane OCTANE
n-Nonane NONANE
n-Decane DECANE
Nitrogen NITROGEN
CarbonDioxide CARBON_DIOXIDE
Water H2O
HydrogenSulfide H2S
Hydrogen HYDROGEN
CarbonMonoxide CARBON_MONOXIDE
Oxygen OXYGEN
Helium HELIUM
Argon ARGON
DewPoint Dew Point
RelativeDensity GRAVITY
Viscosity VISCOSITY
MeterTubeRefTemp REF_TEMP
OrificePlateRefTemp ORIFICE_REF_TEMP
NodeContractHour CONTRACT_HOUR
KFactorVolume K_FACTOR
Device specific event information Device Events: Device Specific

Back to top

PGAS Volume Attributes

Items listed may be applicable for volume (V), quality (Q), or either (V, Q).

FMS Data Item V/Q PGAS XML Attribute - Volume
CFmsDeviceRec.strName V,Q METER_ID
BeginDateTime V START_DATE
EndDateTime V END_DATE
eFMS_PV_FLOW_TIME

FlowTime

V FLOW_TIME_MINS
eFMS_PV_FLOW_VOLUME

Volume

V VOLUME
eFMS_PV_ACCUM_ENERGY

Energy

V ENERGY
eFMS_PV_IV

IV

V FLOW_EXTENSION
eFMS_PV_DIFF_PRESSURE

Dp

V DIFF_PRESS
eFMS_PV_LINE_PRESSURE

Sp

V STATIC_PRESS
eFMS_PV_FLOW_TEMP

Temp

V TEMPERATURE
eFMS_PV_UNCORRECTED_VOLUME

UncorrectedVolume

V UNCORR_VOLUME
eFMS_PV_PULSES

Pulses

V FREQUENCY
eFMS_PV_IMV

IMV

V CPRIME
eFMS_PV_FLOW_RATE V AVG_FLOW_RATE
PQ datetime stamp

'Begin Normalized Date/Time' column value from Raw Data control

Q SAMPLE_ON_DATE
PQ datetime stamp

'Begin Normalized Date/Time' column value from Raw Data control

Q EFFECTIVE_START_DATE
eFMS_PV_NITROGEN

Nitrogen

Q NITROGEN
eFMS_PV_CARBON_DIOXIDE

CarbonDioxide

Q CARBON_DIOXIDE
eFMS_PV_RELATIVE_DENSITY

RelativeDensity

Q REAL_GRAVITY
eFMS_PV_HEATING_VALUE_VOLUME

HeatingValueVolume

Q DRY_HEATING_VALUE
eFMS_PV_METHANE

Methane

Q METHANE
eFMS_PV_ETHANE

Ethane

Q ETHANE
eFMS_PV_PROPANE

Propane

Q PROPANE
eFMS_PV_WATER

Water

Q H2O
eFMS_PV_HYDROGEN_SULFIDE

HydrogenSulfide

Q H2S
eFMS_PV_HYDROGEN

Hydrogen

Q HYDROGEN
eFMS_PV_CARBON_MONOXIDE

CarbonMonoxide

Q CARBON_MONOXIDE
eFMS_PV_OXYGEN

Oxygen

Q OXYGEN
eFMS_PV_ISOBUTANE

Isobutane

Q IBUTANE
eFMS_PV_N_BUTANE

n-Butane

Q NBUTANE
eFMS_PV_ISOPENTANE

Isopentane

Q IPENTANE
eFMS_PV_N_PENTANE

n-Pentane

Q NPENTANE
eFMS_PV_N_HEXANE

n-Hexane

Q HEXANE
eFMS_PV_N_HEPTANE

n-Heptane

Q HEPTANE
eFMS_PV_N_OCTANE

n-Octane

Q OCTANE
eFMS_PV_N_NONANE

n-Nonane

Q NONANE
eFMS_PV_N_DECANE

n-Decane

Q DECANE
eFMS_PV_HELIUM

Helium

Q HELIUM
eFMS_PV_ARGON

Argon

Q ARGON

Back to top